#include "Vector.h"

using std::cin;
using std::cout;
using std::endl;
using namespace Mystd;

void vector_test1()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(6);
	for (auto e : v1)
	{
		cout << e << " ";
	}

	cout << endl;
	for (size_t i = 0; i < v1.size(); i++)
	{
		v1[i]++;
	}

	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl;
}

void vector_test2()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(6);
	v1.push_back(7);

	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	auto it = v1.begin();
	while (it != v1.end())
	{
		if (*it % 2 == 0)
		{
			v1.erase(it);
		}
		++it;
	}

	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	vector_test2();
	return 0;
}